// 表单字段配置
export interface FormField {
  id: string
  label: string
  type: 'textarea' | 'input' | 'tags'
  placeholder?: string
  required?: boolean
  value?: string | string[]
  hint?: string
  maxTags?: number
}

// 表单配置
export interface FormConfig {
  title: string
  panelTitle: string
  viewType: string
  fields: FormField[]
  context?: FormContext
  debugMessage?: string
}

// 上下文配置
export interface FormContext {
  filePath?: string
  lineRange?: string
  codeSnippet?: string
  sanitizeMode?: 'strict' | 'moderate' | 'permissive'
}

// 字段渲染器接口
export interface FieldRenderer {
  render(field: FormField): string
  getValidationScript(field: FormField): string
}

// 表单数据
export interface FormData {
  [key: string]: any
}
